package za.org.jcicada.genss.alarm;

import java.util.Set;

import za.org.jcicada.genss.ServiceURN;
import za.org.jcicada.genss.messages.Result;


/**
 * IAlarmObserver.java
 *
 * @author Simon Cross
 *
 * Created on November 11, 2008, 13:03
 */


/**
 * Observer for an IAlarmSubject.
 */
public interface IAlarmObserver {

    /**
     * Reply to attach request.
     */
    void replyAttach(Result result);
    
    /**
     * Reply to detach request.
     */
    void replyDetach(Result result);
    
    /**
     * Request that the list of alarms present on this sensor
     * be sent.
     */
    void replyAlarmSet(Result result, Set<AlarmURN> alarmURNs);

    /**
     * @todo What is getReport intended to return?
     */
    void replyReport(Result result, String report);
    
    /**
     * Reply when requested to acknowledge an alarm.
     */
    void replyAcknowledgeAlarm(Result result, AlarmURN alarmURN);

    // inform messages
    
    /**
     * Notify the observer of a change in the status of an alarm.
     */
    void informAlarm(AlarmURN alarmURN, IAlarm alarm);
    
    /**
     * Notify the observer that its attachment has been terminated.
     */
    void informTerminateService(ServiceURN serviceURN);
    
    /**
     * Notify the observer that it has been disconnected from the subject
     */
    void informDisconnect();

}
